package com.haixiaoke.saas.department.service.impl;

import java.util.List;

import com.haixiaoke.saas.common.utils.DateUtils;
import com.haixiaoke.saas.department.domain.ElectronicVisaRecord;
import com.haixiaoke.saas.department.mapper.ElectronicVisaRecordMapper;
import com.haixiaoke.saas.department.service.IElectronicVisaRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 企业电子合同数量操作记录Service业务层处理
 * 
 * @author panda
 * @date 2024-05-29
 */
@Service
public class ElectronicVisaRecordServiceImpl implements IElectronicVisaRecordService {
    @Autowired
    private ElectronicVisaRecordMapper electronicVisaRecordMapper;

    /**
     * 查询企业电子合同数量操作记录
     * 
     * @param id 企业电子合同数量操作记录主键
     * @return 企业电子合同数量操作记录
     */
    @Override
    public ElectronicVisaRecord selectElectronicVisaRecordById(Long id) {
        return electronicVisaRecordMapper.selectElectronicVisaRecordById(id);
    }

    /**
     * 查询企业电子合同数量操作记录列表
     * 
     * @param electronicVisaRecord 企业电子合同数量操作记录
     * @return 企业电子合同数量操作记录
     */
    @Override
    public List<ElectronicVisaRecord> selectElectronicVisaRecordList(ElectronicVisaRecord electronicVisaRecord) {
        return electronicVisaRecordMapper.selectElectronicVisaRecordList(electronicVisaRecord);
    }

    /**
     * 新增企业电子合同数量操作记录
     * 
     * @param electronicVisaRecord 企业电子合同数量操作记录
     * @return 结果
     */
    @Override
    public int insertElectronicVisaRecord(ElectronicVisaRecord electronicVisaRecord) {
        electronicVisaRecord.setCreateTime(DateUtils.getNowDate());
        return electronicVisaRecordMapper.insertElectronicVisaRecord(electronicVisaRecord);
    }

    /**
     * 修改企业电子合同数量操作记录
     * 
     * @param electronicVisaRecord 企业电子合同数量操作记录
     * @return 结果
     */
    @Override
    public int updateElectronicVisaRecord(ElectronicVisaRecord electronicVisaRecord) {
        return electronicVisaRecordMapper.updateElectronicVisaRecord(electronicVisaRecord);
    }

    /**
     * 批量删除企业电子合同数量操作记录
     * 
     * @param ids 需要删除的企业电子合同数量操作记录主键
     * @return 结果
     */
    @Override
    public int deleteElectronicVisaRecordByIds(Long[] ids) {
        return electronicVisaRecordMapper.deleteElectronicVisaRecordByIds(ids);
    }

    /**
     * 删除企业电子合同数量操作记录信息
     * 
     * @param id 企业电子合同数量操作记录主键
     * @return 结果
     */
    @Override
    public int deleteElectronicVisaRecordById(Long id) {
        return electronicVisaRecordMapper.deleteElectronicVisaRecordById(id);
    }
}
